package com.minimalist.common.entity.lindi.vo.tradeapplicationapprovefile;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.minimalist.common.config.mybatis.bo.PageReq;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 11987
 */
@Schema(name = "林地指标交易平台_交易申请审批文件查询实体")
public class TradeApplicationApproveFileQueryVO extends PageReq implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(name = "tradeApplicationId", description = "交易申请ID", type = "string")
    private Long tradeApplicationId;

    @Schema(name = "approveFileName", description = "审批文件名称", type = "string")
    private String approveFileName;

    @Schema(name = "createTime", description = "创建时间", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime createTime;

    public TradeApplicationApproveFileQueryVO() {
    }

    public TradeApplicationApproveFileQueryVO(Long tradeApplicationId, String approveFileName, LocalDateTime createTime) {
        this.tradeApplicationId = tradeApplicationId;
        this.approveFileName = approveFileName;
        this.createTime = createTime;
    }

    public Long getTradeApplicationId() {
        return tradeApplicationId;
    }

    public void setTradeApplicationId(Long tradeApplicationId) {
        this.tradeApplicationId = tradeApplicationId;
    }

    public String getApproveFileName() {
        return approveFileName;
    }

    public void setApproveFileName(String approveFileName) {
        this.approveFileName = approveFileName;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        TradeApplicationApproveFileQueryVO that = (TradeApplicationApproveFileQueryVO) o;

        if (tradeApplicationId != null ? !tradeApplicationId.equals(that.tradeApplicationId) : that.tradeApplicationId != null) return false;
        if (approveFileName != null ? !approveFileName.equals(that.approveFileName) : that.approveFileName != null) return false;
        return createTime != null ? createTime.equals(that.createTime) : that.createTime == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (tradeApplicationId != null ? tradeApplicationId.hashCode() : 0);
        result = 31 * result + (approveFileName != null ? approveFileName.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        return result;
    }
}
